﻿using DataService.Office.Word;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace DataService.Office.WordDTO
{
    public class WordTableDTO
    {
        /// <summary>
        /// word模板,标志位，标志
        /// </summary>
        public string Cell_Key { get; set; }
        /// <summary>
        /// word模板,需要替换标志位的 新值
        /// </summary>
        public string Cell_Value { get; set; }
        /// <summary>
        /// word模板,需要替换的 参照图片
        /// </summary>
        public List<DrawingDTO> Cell_Drawings { get; set; }
        public int TableContentType { get; set; } = (int)WordTableContentEnum.单行单值文字;

    }
    public class WordAppendRowDTO
    {
        public string Cell_Key { get; set; }
        /// <summary>
        /// 表格内表格，表头所在 行 位置（从1开始）
        /// </summary>
        public int RowStartIndex { get; set; }

        public int ColumnStartIndex { get; set; }

        public DataTable AppendDataTable { get; set; }

        /// <summary>
        /// 横向合并
        /// </summary>
        public List<TableMergeCellDTO> CellsMerge { get; set; }

        public List<TableTextStyle> TableStyles { get; set; }
        /// <summary>
        /// 纵向合并
        /// </summary>
        public List<TableVerticalMergeDTO> RowsMerge { get; set; }

    }

    public class WordTableFullDTO
    {
        /// <summary>
        /// Table的标志位参数和值的集合
        /// </summary>
        public List<WordTableDTO> TableSingleArray { get; set; }
        /// <summary>
        /// 表格中的表格，默认表格中嵌套一个表格
        /// </summary>
        public WordAppendRowDTO AppendRowDTO { get; set; }
    }
    public enum WordTableContentEnum
    {
        单行单值文字 = 1,
        单行多值文字 = 2,
        图片 = 3,
        多行集合 = 4,
    }
}
